---
layout: "default"
title: "ReversedRandomAccessIndex"
description: "Swift documentation for 'ReversedRandomAccessIndex': An index that traverses the same positions as an underlying index,."
keywords: "ReversedRandomAccessIndex,struct,swift,documentation,<,==,base"
root: "/v3.0"
---

<div class="intro-declaration"><code class="language-swift">struct ReversedRandomAccessIndex&lt;Base : RandomAccessCollection&gt;</code></div>

<div class="discussion comment">
    <p>An index that traverses the same positions as an underlying index,
with inverted traversal direction.</p>
</div>

<table class="standard">
<tr>
<th id="inheritance">Inheritance</th>
<td>
<code class="inherits">Comparable, Equatable</code>
<span class="viz"><a href="hierarchy/">View Protocol Hierarchy &rarr;</a></span>
</td>
</tr>



<tr>
<th>Import</th>
<td><code class="language-swift">import Swift</code></td>
</tr>

</table>


<h3>Initializers</h3>
<div class="declaration" id="init_">
<a class="toggle-link" data-toggle="collapse" href="#comment-init_">init(<wbr>_:)</a><div class="comment collapse" id="comment-init_"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">init(_ base: Base.Index)</code>

    </div></div>
</div>


<h3>Instance Variables</h3>
<div class="declaration" id="var-base_-base-index">
<a class="toggle-link" data-toggle="collapse" href="#comment-var-base_-base-index">var base: Base.Index</a><div class="comment collapse" id="comment-var-base_-base-index"><div class="p">
    <p>The position corresponding to <code>self</code> in the underlying collection.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">var base: Base.Index { get }</code>

    </div></div>
</div>



<h3>Instance Methods</h3>
<div class="declaration" id="func-lt_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_rhs_">func &lt;(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-lt_rhs_"><div class="p">
    <p>Returns a Boolean value indicating whether the value of the first
argument is less than that of the second argument.</p>

<p>This function is the only requirement of the <code>Comparable</code> protocol. The
remainder of the relational operator functions are implemented by the
standard library for any type that conforms to <code>Comparable</code>.</p>

<p><strong>Parameters:</strong>
  <strong>lhs:</strong> A value to compare.
  <strong>rhs:</strong> Another value to compare.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: ReversedRandomAccessIndex&lt;Base&gt;, rhs: ReversedRandomAccessIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-eqeq_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-eqeq_rhs_">func ==(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-eqeq_rhs_"><div class="p">
    <p>Returns a Boolean value indicating whether two values are equal.</p>

<p>Equality is the inverse of inequality. For any values <code>a</code> and <code>b</code>,
<code>a == b</code> implies that <code>a != b</code> is <code>false</code>.</p>

<p><strong>Parameters:</strong>
  <strong>lhs:</strong> A value to compare.
  <strong>rhs:</strong> Another value to compare.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func ==(lhs: ReversedRandomAccessIndex&lt;Base&gt;, rhs: ReversedRandomAccessIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>


